<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <script src="jquery-3.2.1.min.js"></script>
    <script src="bootstrap/js/bootstrap.bundle.js"></script>
    <title>Bootstrap</title>
    <style>
    </style>
</head>
<body>
    <button id="showModal1" data-toggle="modal" data-target="#exampleModal">弹窗1</button>
    <button id="showModal2">弹窗2</button>
    
    <div id="exampleModal" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Modal title</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <p>Modal body text goes here.</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">Save changes</button>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
            </div>
        </div>
    </div>
    <script>
        $('#showModal2').click(function(){
            $('#exampleModal').modal();
        });
    </script>
</body>
</html>
